//模块化划分入口文件
import React, { Suspense } from 'react';

const Setting = React.lazy(() => import('./Global/Setting'));/*后台管理界面*/
const App = React.lazy(() => import("./App"));/*审批表单页*/
const Login = React.lazy(() => import("./Login"));/*登录页*/

function Entry() {
  
  let pathname=window.location.pathname;
  if(pathname === "/platform-manage/login"){//登录界面
    return <Suspense fallback={null}><Login></Login></Suspense>
  }
  else if(~pathname.indexOf("/platform-manage")){//系统管理模块
    return <Suspense fallback={null}><Setting></Setting></Suspense>
  }
  else
  {
    return <Suspense fallback={null}><App></App></Suspense>
  }
}

export default Entry;
